<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<title>Installed Files</title>
<link href="../docs-assets/Breadcrumbs.css" rel="stylesheet" rev="stylesheet" type="text/css">
		<meta name="viewport" content="width=device-width initial-scale=1">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta http-equiv="Content-Language" content="en-gb">

<link href="../docs-assets/Contents.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Progress.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Navigation.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Fonts.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Base.css" rel="stylesheet" rev="stylesheet" type="text/css">
<script>
function togglePopup(material_id) {
  var popup = document.getElementById(material_id);
  popup.classList.toggle("show");
}
</script>

<link href="../docs-assets/Popups.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Colours.css" rel="stylesheet" rev="stylesheet" type="text/css">
		
	</head>
	<body class="commentary-font">
		<nav role="navigation">
		<h1><a href="../index.html"><img src="../docs-assets/Inform.png" height=72> </a></h1>
<ul><li><a href="../index.html">home</a></li>
</ul><h2>Compiler</h2><ul>
<li><a href="../structure.html">structure</a></li>
<li><a href="../inbuildn.html">inbuild</a></li>
<li><a href="../inform7n.html">inform7</a></li>
<li><a href="../intern.html">inter</a></li>
<li><a href="../services.html">services</a></li>
<li><a href="../secrets.html">secrets</a></li>
</ul><h2>Other Tools</h2><ul>
<li><a href="../inblorbn.html">inblorb</a></li>
<li><a href="../inform6.html">inform6</a></li>
<li><a href="../inpolicyn.html">inpolicy</a></li>
</ul><h2>Resources</h2><ul>
<li><a href="../extensions.html">extensions</a></li>
<li><a href="../kits.html">kits</a></li>
</ul><h2>Repository</h2><ul>
<li><a href="https://github.com/ganelson/inform"><img src="../docs-assets/github.png" height=0> github</a></li>
</ul><h2>Related Projects</h2><ul>
<li><a href="https://github.com/ganelson/inweb"><img src="../docs-assets/github.png" height=0> inweb</a></li>
<li><a href="https://github.com/ganelson/intest"><img src="../docs-assets/github.png" height=0> intest</a></li>
</ul>
		</nav>
		<main role="main">
		<!-- Weave of 'Installed Files' generated by inweb -->
<div class="breadcrumbs">
    <ul class="crumbs"><li><a href="../index.html">Home</a></li><li><a href="../services.html">Services</a></li><li><a href="index.html">html</a></li><li><a href="index.html#2">Chapter 2: Intranet</a></li><li><b>Installed Files</b></li></ul></div>
<p class="purpose">Filenames for a few unmanaged files included in a standard Inform installation.</p>

<p class="commentary firstcommentary"><a id="SP1" class="paragraph-anchor"></a><b>&#167;1. </b>Inform needs a whole pile of files to have been installed on the host computer
before it can run: everything from the Standard Rules to a PDF file explaining
what interactive fiction is. They're never written to, only read. They are
stored in subdirectories called <span class="extract"><span class="extract-syntax">Miscellany</span></span> or <span class="extract"><span class="extract-syntax">HTML</span></span> of the internal nest;
but they're just plain old files, and are not managed by Inbuild as "copies".
</p>

<pre class="definitions code-font"><span class="definition-keyword">enum</span> <span class="constant-syntax">CBLORB_REPORT_MODEL_IRES</span><span class="plain-syntax"> </span><span class="identifier-syntax">from</span><span class="plain-syntax"> </span><span class="constant-syntax">1</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">DOCUMENTATION_SNIPPETS_IRES</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">INTRO_BOOKLET_IRES</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">INTRO_POSTCARD_IRES</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">LARGE_DEFAULT_COVER_ART_IRES</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">SMALL_DEFAULT_COVER_ART_IRES</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">DOCUMENTATION_XREFS_IRES</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">JAVASCRIPT_FOR_STANDARD_PAGES_IRES</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">JAVASCRIPT_FOR_EXTENSIONS_IRES</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">JAVASCRIPT_FOR_ONE_EXTENSION_IRES</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">CSS_SET_BY_PLATFORM_IRES</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">CSS_FOR_STANDARD_PAGES_IRES</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">RESOURCE_JSON_REQS_IRES</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">REGISTRY_JSON_REQS_IRES</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">INBUILD_JSON_REQS_IRES</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">UNICODE_DATA_IRES</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">MIT_LICENSE_IRES</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">MIT_0_LICENSE_IRES</span>
</pre>
<pre class="displayed-code all-displayed-code code-font">
<span class="identifier-syntax">filename</span><span class="plain-syntax"> *</span><span class="function-syntax">InstalledFiles::filename</span><button class="popup" onclick="togglePopup('usagePopup1')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup1">Usage of <span class="code-font"><span class="function-syntax">InstalledFiles::filename</span></span>:<br/><a href="2-if.html#SP3">&#167;3</a><br/>Inform Pages - <a href="2-ip.html#SP1">&#167;1</a><br/>Documentation References - <a href="2-dr.html#SP3">&#167;3</a>, <a href="2-dr.html#SP11_1">&#167;11.1</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">ires</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">pathname</span><span class="plain-syntax"> *</span><span class="identifier-syntax">internal</span><span class="plain-syntax"> = </span><span class="identifier-syntax">INSTALLED_FILES_HTML_CALLBACK</span><span class="plain-syntax">();</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">pathname</span><span class="plain-syntax"> *</span><span class="identifier-syntax">misc</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Pathnames::down</span><span class="plain-syntax">(</span><span class="identifier-syntax">internal</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"Miscellany"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">pathname</span><span class="plain-syntax"> *</span><span class="identifier-syntax">models</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Pathnames::down</span><span class="plain-syntax">(</span><span class="identifier-syntax">internal</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"HTML"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">switch</span><span class="plain-syntax"> (</span><span class="identifier-syntax">ires</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">DOCUMENTATION_SNIPPETS_IRES:</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">Filenames::in</span><span class="plain-syntax">(</span><span class="identifier-syntax">misc</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"definitions.html"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">INTRO_BOOKLET_IRES:</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">Filenames::in</span><span class="plain-syntax">(</span><span class="identifier-syntax">misc</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"IntroductionToIF.pdf"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">INTRO_POSTCARD_IRES:</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">Filenames::in</span><span class="plain-syntax">(</span><span class="identifier-syntax">misc</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"Postcard.pdf"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">LARGE_DEFAULT_COVER_ART_IRES:</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">Filenames::in</span><span class="plain-syntax">(</span><span class="identifier-syntax">misc</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"DefaultCover.jpg"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">SMALL_DEFAULT_COVER_ART_IRES:</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">Filenames::in</span><span class="plain-syntax">(</span><span class="identifier-syntax">misc</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"Small Cover.jpg"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">RESOURCE_JSON_REQS_IRES:</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">Filenames::in</span><span class="plain-syntax">(</span><span class="identifier-syntax">misc</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"resource.jsonr"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">REGISTRY_JSON_REQS_IRES:</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">Filenames::in</span><span class="plain-syntax">(</span><span class="identifier-syntax">misc</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"registry.jsonr"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">INBUILD_JSON_REQS_IRES:</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">Filenames::in</span><span class="plain-syntax">(</span><span class="identifier-syntax">misc</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"inbuild.jsonr"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">UNICODE_DATA_IRES:</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">Filenames::in</span><span class="plain-syntax">(</span><span class="identifier-syntax">misc</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"UnicodeData.txt"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">MIT_LICENSE_IRES:</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">Filenames::in</span><span class="plain-syntax">(</span><span class="identifier-syntax">misc</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"MIT.html"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">MIT_0_LICENSE_IRES:</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">Filenames::in</span><span class="plain-syntax">(</span><span class="identifier-syntax">misc</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"MIT-0.html"</span><span class="plain-syntax">);</span>

<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">CBLORB_REPORT_MODEL_IRES:</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="2-if.html#SP2" class="function-link"><span class="function-syntax">InstalledFiles::varied_by_platform</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">models</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"CblorbModel.html"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">DOCUMENTATION_XREFS_IRES:</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="2-if.html#SP2" class="function-link"><span class="function-syntax">InstalledFiles::varied_by_platform</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">models</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"xrefs.txt"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">JAVASCRIPT_FOR_STANDARD_PAGES_IRES:</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="2-if.html#SP2" class="function-link"><span class="function-syntax">InstalledFiles::varied_by_platform</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">models</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"main.js"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">JAVASCRIPT_FOR_EXTENSIONS_IRES:</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="2-if.html#SP2" class="function-link"><span class="function-syntax">InstalledFiles::varied_by_platform</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">models</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"extensions.js"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">JAVASCRIPT_FOR_ONE_EXTENSION_IRES:</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="2-if.html#SP2" class="function-link"><span class="function-syntax">InstalledFiles::varied_by_platform</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">models</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"extensionfile.js"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">CSS_SET_BY_PLATFORM_IRES:</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="2-if.html#SP2" class="function-link"><span class="function-syntax">InstalledFiles::varied_by_platform</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">models</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"platform.css"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">CSS_FOR_STANDARD_PAGES_IRES:</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="2-if.html#SP2" class="function-link"><span class="function-syntax">InstalledFiles::varied_by_platform</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">models</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"main.css"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">internal_error</span><span class="plain-syntax">(</span><span class="string-syntax">"unknown installation resource file"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP2" class="paragraph-anchor"></a><b>&#167;2. </b>This enables each platform to provide its own CSS and Javascript definitions,
if they would prefer that:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="identifier-syntax">filename</span><span class="plain-syntax"> *</span><span class="function-syntax">InstalledFiles::varied_by_platform</span><button class="popup" onclick="togglePopup('usagePopup2')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup2">Usage of <span class="code-font"><span class="function-syntax">InstalledFiles::varied_by_platform</span></span>:<br/><a href="2-if.html#SP1">&#167;1</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">pathname</span><span class="plain-syntax"> *</span><span class="identifier-syntax">models</span><span class="plain-syntax">, </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">leafname</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">TEMPORARY_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">variation</span><span class="plain-syntax">)</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">variation</span><span class="plain-syntax">, </span><span class="string-syntax">"%s-%S"</span><span class="plain-syntax">, </span><span class="identifier-syntax">PLATFORM_STRING</span><span class="plain-syntax">, </span><span class="identifier-syntax">leafname</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="comment-syntax"> NB: PLATFORM_STRING is a C string, so that %s is correct</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">filename</span><span class="plain-syntax"> *</span><span class="identifier-syntax">F</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Filenames::in</span><span class="plain-syntax">(</span><span class="identifier-syntax">models</span><span class="plain-syntax">, </span><span class="identifier-syntax">variation</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">TextFiles::exists</span><span class="plain-syntax">(</span><span class="identifier-syntax">F</span><span class="plain-syntax">) == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">) </span><span class="identifier-syntax">F</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Filenames::in</span><span class="plain-syntax">(</span><span class="identifier-syntax">models</span><span class="plain-syntax">, </span><span class="identifier-syntax">leafname</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">DISCARD_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">variation</span><span class="plain-syntax">)</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">F</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP3" class="paragraph-anchor"></a><b>&#167;3. </b>Or even for a different platform than the one we're running on:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="identifier-syntax">filename</span><span class="plain-syntax"> *</span><span class="function-syntax">InstalledFiles::filename_for_platform</span><span class="plain-syntax">(</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">ires</span><span class="plain-syntax">, </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">platform</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Str::len</span><span class="plain-syntax">(</span><span class="identifier-syntax">platform</span><span class="plain-syntax">) == </span><span class="constant-syntax">0</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="2-if.html#SP1" class="function-link"><span class="function-syntax">InstalledFiles::filename</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">ires</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">pathname</span><span class="plain-syntax"> *</span><span class="identifier-syntax">internal</span><span class="plain-syntax"> = </span><span class="identifier-syntax">INSTALLED_FILES_HTML_CALLBACK</span><span class="plain-syntax">();</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">pathname</span><span class="plain-syntax"> *</span><span class="identifier-syntax">models</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Pathnames::down</span><span class="plain-syntax">(</span><span class="identifier-syntax">internal</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"HTML"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">switch</span><span class="plain-syntax"> (</span><span class="identifier-syntax">ires</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">CBLORB_REPORT_MODEL_IRES:</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="2-if.html#SP3" class="function-link"><span class="function-syntax">InstalledFiles::varied_by_named_platform</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">models</span><span class="plain-syntax">,</span>
<span class="plain-syntax">                    </span><span class="identifier-syntax">I</span><span class="string-syntax">"CblorbModel.html"</span><span class="plain-syntax">, </span><span class="identifier-syntax">platform</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">DOCUMENTATION_XREFS_IRES:</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="2-if.html#SP3" class="function-link"><span class="function-syntax">InstalledFiles::varied_by_named_platform</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">models</span><span class="plain-syntax">,</span>
<span class="plain-syntax">                    </span><span class="identifier-syntax">I</span><span class="string-syntax">"xrefs.txt"</span><span class="plain-syntax">, </span><span class="identifier-syntax">platform</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">JAVASCRIPT_FOR_STANDARD_PAGES_IRES:</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="2-if.html#SP3" class="function-link"><span class="function-syntax">InstalledFiles::varied_by_named_platform</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">models</span><span class="plain-syntax">,</span>
<span class="plain-syntax">                    </span><span class="identifier-syntax">I</span><span class="string-syntax">"main.js"</span><span class="plain-syntax">, </span><span class="identifier-syntax">platform</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">JAVASCRIPT_FOR_EXTENSIONS_IRES:</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="2-if.html#SP3" class="function-link"><span class="function-syntax">InstalledFiles::varied_by_named_platform</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">models</span><span class="plain-syntax">,</span>
<span class="plain-syntax">                    </span><span class="identifier-syntax">I</span><span class="string-syntax">"extensions.js"</span><span class="plain-syntax">, </span><span class="identifier-syntax">platform</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">JAVASCRIPT_FOR_ONE_EXTENSION_IRES:</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="2-if.html#SP3" class="function-link"><span class="function-syntax">InstalledFiles::varied_by_named_platform</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">models</span><span class="plain-syntax">,</span>
<span class="plain-syntax">                    </span><span class="identifier-syntax">I</span><span class="string-syntax">"extensionfile.js"</span><span class="plain-syntax">, </span><span class="identifier-syntax">platform</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">CSS_SET_BY_PLATFORM_IRES:</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="2-if.html#SP3" class="function-link"><span class="function-syntax">InstalledFiles::varied_by_named_platform</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">models</span><span class="plain-syntax">,</span>
<span class="plain-syntax">                    </span><span class="identifier-syntax">I</span><span class="string-syntax">"platform.css"</span><span class="plain-syntax">, </span><span class="identifier-syntax">platform</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">CSS_FOR_STANDARD_PAGES_IRES:</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="2-if.html#SP3" class="function-link"><span class="function-syntax">InstalledFiles::varied_by_named_platform</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">models</span><span class="plain-syntax">,</span>
<span class="plain-syntax">                    </span><span class="identifier-syntax">I</span><span class="string-syntax">"main.css"</span><span class="plain-syntax">, </span><span class="identifier-syntax">platform</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="2-if.html#SP1" class="function-link"><span class="function-syntax">InstalledFiles::filename</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">ires</span><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>

<span class="identifier-syntax">filename</span><span class="plain-syntax"> *</span><span class="function-syntax">InstalledFiles::varied_by_named_platform</span><span class="plain-syntax">(</span><span class="identifier-syntax">pathname</span><span class="plain-syntax"> *</span><span class="identifier-syntax">models</span><span class="plain-syntax">, </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">leafname</span><span class="plain-syntax">,</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">platform</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">TEMPORARY_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">variation</span><span class="plain-syntax">)</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">variation</span><span class="plain-syntax">, </span><span class="string-syntax">"%S-%S"</span><span class="plain-syntax">, </span><span class="identifier-syntax">platform</span><span class="plain-syntax">, </span><span class="identifier-syntax">leafname</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">filename</span><span class="plain-syntax"> *</span><span class="identifier-syntax">F</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Filenames::in</span><span class="plain-syntax">(</span><span class="identifier-syntax">models</span><span class="plain-syntax">, </span><span class="identifier-syntax">variation</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">TextFiles::exists</span><span class="plain-syntax">(</span><span class="identifier-syntax">F</span><span class="plain-syntax">) == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">) </span><span class="identifier-syntax">F</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Filenames::in</span><span class="plain-syntax">(</span><span class="identifier-syntax">models</span><span class="plain-syntax">, </span><span class="identifier-syntax">leafname</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">DISCARD_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">variation</span><span class="plain-syntax">)</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">F</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP4" class="paragraph-anchor"></a><b>&#167;4. </b>This directory also holds the <span class="extract"><span class="extract-syntax">Basic.indext</span></span> and <span class="extract"><span class="extract-syntax">Standard.indext</span></span> index
structure files, but in principle we allow a wider range of these to exist, so:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="identifier-syntax">filename</span><span class="plain-syntax"> *</span><span class="function-syntax">InstalledFiles::index_structure_file</span><span class="plain-syntax">(</span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">leaf</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">pathname</span><span class="plain-syntax"> *</span><span class="identifier-syntax">internal</span><span class="plain-syntax"> = </span><span class="identifier-syntax">INSTALLED_FILES_HTML_CALLBACK</span><span class="plain-syntax">();</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">pathname</span><span class="plain-syntax"> *</span><span class="identifier-syntax">misc</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Pathnames::down</span><span class="plain-syntax">(</span><span class="identifier-syntax">internal</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"Miscellany"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">Filenames::in</span><span class="plain-syntax">(</span><span class="identifier-syntax">misc</span><span class="plain-syntax">, </span><span class="identifier-syntax">leaf</span><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>
</pre>
<nav role="progress"><div class="progresscontainer">
    <ul class="progressbar"><li class="progressprev"><a href="2-pb.html">&#10094;</a></li><li class="progresschapter"><a href="P-wtmd.html">P</a></li><li class="progresschapter"><a href="1-hm.html">1</a></li><li class="progresscurrentchapter">2</li><li class="progresssection"><a href="2-ip.html">ip</a></li><li class="progresssection"><a href="2-sl.html">sl</a></li><li class="progresssection"><a href="2-pb.html">pb</a></li><li class="progresscurrent">if</li><li class="progresssection"><a href="2-dr.html">dr</a></li><li class="progresssection"><a href="2-lcl.html">lcl</a></li><li class="progressnext"><a href="2-dr.html">&#10095;</a></li></ul></div>
</nav><!-- End of weave -->

		</main>
	</body>
</html>

